issues while converting ES query to java Code